<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" onselectstart="return false">
  <head >
    <title>搜索管理后台 - 标签库管理 - 商品标签管理</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="${request.contextPath}/css/style_manager.css">
	<script type="text/javascript" src="${request.contextPath}/js/jquery-1.4.2.js"></script>
	<script type="text/javascript" src="${request.contextPath}/js/manager.js"></script>
	<script type="text/javascript" src="${request.contextPath}/js/jquery.overblock-1.2.js"></script>
		
	<script type="text/javascript">
	var goodsObj = {};
	var tagObj = {};
	goodsObj.cp = 1;
	goodsObj.total = 0;
	goodsObj.pp = 20;
	tagObj.cp = 1;
	tagObj.total = 0;
	tagObj.pp = 20;
	
	var currentPage = 1;
	var totalNum = 0;
	var currentMenu = 1;
	$(function(){
		init();
	//	showTagInfo(getHTML());
	});
	
	function getHTML() {
		var h = '';
		for(var i = 0; i < 30; i ++) {
			h += getHTMLtest(662630 + i, "新品"+i);
		}
		return h;
	}
	function getHTMLtest(g, n) {
		var h = "<input type=\"hidden\" class=\"errorGoodsSn\" value=\""+g+"\" />" +
				"<span class=\"errorGoodsSn1\">"+g+"</span>" +
				"<span class=\"errorTags\">"+n+"</span><br />";
		return h;
	}
	
	
	
	//按标签查询商品，保存已选择的标签id和内容
	var selectTags = {};
	//保持或删除id信息
	function pushTags(id, w){
		if(selectTags[id]){
			deleteTags(id);
		}else{
			selectTags[id] = w;
		}
	}
	function deleteTags(id){
		selectTags[id] = null;
		delete selectTags[id];
	}
	//事件初始化
	function init(){
		var o = $('#gtDivs');
		o.css('top', '0px');
		var obj = $('.btnStyle4').eq(0);
		obj.css({'background-color' : 'red', 'font-weight' : 'bold'});
		obj.css('box-shadow', 'rgba(25, 25, 25, 0.85) 1px 1px 3px');
		
		//给搜索出来的表情信息元素添加事件
		$('#findTagShow').find('span[class*="tagSpan"]').live('click', function(){
			var id = $(this).find('.tagId').val();
			var w = $(this).find('.tagWord').val();
			pushTags(id, w);
			drawTagSpan();
		});
		
		//按标签搜索框的click事件
		$('#tagInputDiv').click(function(e){
			if($(e.target).attr('id') != ''){
				showFloat(1);
			}else{
				var clickObj = $(e.target);
				var id = clickObj.find('.tagId').val();
				pushTags(id);
				//confirmTags();
				clickObj.fadeOut(0, function(){
					$(this).remove();
					queryByTagId();
				});
			}
		});
		
		//listTagsId
		$('#findTagInput').keyup(function(e){
			var v = $(this).val().trim();
			if(v != null && v.length > 0 && e.keyCode == 13){
				listTags();
			}
		});
		
		$('#gtQuickTagInput').keyup(function(e){
			var v = $(this).val();
			getStartWith(v);
		});
		
		$('#gtDiv1List,#gtDiv2List').scroll(function(){
			hideGtQuickFloat();
		});
		
		$('body').click(function(e){
			var o = $(e.target);
			if(o.attr('id') == 'gtQuickFloat' || o.parents('#gtQuickFloat').length > 0 || o.attr('class') == 'addBtn'){
				
			}else{
				hideGtQuickFloat();
			}
		});
	}
	//重绘标签信息元素，以保存的id信息，不同颜色显示
	function drawTagSpan(){
		$('#findTagShow').find('span[class*="tagSpan"]').each(function(){
			var id = $(this).find('.tagId').val();
			var w = $(this).find('.tagWord').val();
			if(selectTags[id]){
				$(this).addClass('tagBg');
			}else{
				$(this).removeClass('tagBg');
			}
		});
	}
	//确认选择标签
	function confirmTags(){
		var h = '';
		for(var id in selectTags){
			var word = selectTags[id];
			if(word){
				h += '<span class="tag_Span">'+word+'<input type="hidden" value="'+id+'" class="tagId" /></span>';
			}
		}
		$('#tagInput').html(h);
		showFloat(0);
		queryByTagId(1);
	}
	//取消选择标签
	function confirmTags1() {
		showFloat(0);
	}
	//显示 按条件查询 或 按标签查询
	function show(n){
		currentMenu = n;
		$('.btnStyle4').css({'background-color' : '#91D925', 'font-weight' : 'normal',
			'box-shadow' : 'rgba(12, 12, 12, 0.65) 3px 3px 9px'});
		try{
			var obj = null;
			if(arguments.callee.caller.arguments[0]){
				obj = $(arguments.callee.caller.arguments[0].target);
			}else{
				if(n == 1){
					obj = $('#searchByQuery');
				}else{
					obj = $('#searchByTag');
				}
			}
			obj.css({'background-color' : 'red', 'font-weight' : 'bold'});
			obj.css('box-shadow', 'rgba(25, 25, 25, 0.85) 1px 1px 3px');
		}catch(e){
		}
		var o = $('#gtDivs');
		var h = o.height();
		var delt1 = 0, delt2 = 0, delt = 0;
		$('#gtDiv1List,#gtDiv2List').css('visibility', 'hidden');
		//按条件搜索
		if(n && n == 1){
			tagObj.cp = currentPage;
			tagObj.total = totalNum;
		
			currentPage = goodsObj.cp;
			totalNum = goodsObj.total;
			delt = 0;
			delt1 = 60;
			delt2 = -40;
		}else{
			//按标签搜索
			goodsObj.cp = currentPage;
			goodsObj.total = totalNum;
		
			currentPage = tagObj.cp;
			totalNum = tagObj.total;
			
			delt = 0 - h/2;
			delt1 = delt - 60;
			delt2 = delt + 40;
		}
		o.stop(true).animate({top:delt1}, 500, function(){
			$(this).animate({top:delt2}, 400, function(){
				$(this).animate({top:delt}, 400, function(){
					$('#gtDiv1List,#gtDiv2List').css('visibility', 'visible');
				});
			});
		});
	}
	//标签查询浮层
	function showFloat(n){
		if(n && n > 0){
			$('#findTagShow').html('');
			var o = {};
			o.closeable = false;
			o.blockStyle = {};
			o.blockStyle.opacity = 0;
			$('#gtFloat').showPop(o);
			$('#findTagInput').val('').focus();
		}else{
			$('#gtFloat').hidePop(300);
		}
	}
	//查询标签
	function listTags(){
		var wds = $('#findTagInput').val();
		if(wds.toString().trim().length < 1){
			return;
		}
		wds = encodeURI(wds);
		ajax('listtag?keyword=' + wds, function(rs){
			var h = '';
			if(rs && rs.length > 4){
				var obj = eval(rs)[0];
				var count = obj.count;
				var list = obj.list;
				if(count > 0 && list && list.length > 0){
					for(var i = 0, len = list.length; i < len; i ++){
						var w = list[i];
						var word = w.keyWord;
						var id = w.id;
						h += '<span class="tagSpan">'+word+
						'<input type="hidden" value="'+id+'" class="tagId" /><input class="tagWord" type="hidden" value="'+word+'" /></span>';
					}
				}else{
					h = '<div style="font-size:13px;color:red;padding:15px;">木有符合要求的标签，可以改变搜索条件或添加标签</div>';
				}
			}else{
				h = '<div style="font-size:13px;color:red;padding:15px;">木有符合要求的标签，可以改变搜索条件或添加标签</div>';
			}
		
			$('#findTagShow').html(h);
			drawTagSpan();
		});
	}
	
	//获取tag的id
	function getTagsId(){
		return $('#tagInput').find('.tagId').map(function(){
			return $(this).val();
		}).get().join(',');
	}
	//按标签获取商品信息
	function queryByTagId(n){
		if(n && n > 0){
			currentPage = n;
		}
		var ids = getTagsId();
		ajax('findbytagid?ids=' + ids + '&pp='+tagObj.pp+'&cp=' + currentPage, function(rs){
			listGoods(rs, $('#gtDiv2List'));
		});
	}
	//重置查询条件
	function resetQuery(){
		$('#keyword,#cid,#bc').val('');
		$('#sortCol,#sortType,#pin,#sx').each(function(){
			$(this).find('option').eq(0).attr('selected','selected');
		});
	}
	//按条件获取商品信息
	function queryGoods(n){
		if(n && n > 0){
			currentPage = n;
		}
		var sps = jsonToString(getSearchParam());

		ajax('querygoods?spStr=' +sps, function(rs){
			listGoods(rs, $('#gtDiv1List'));
		});
	}
	function getSearchParam(){
		var sp = {};
		sp.pp = goodsObj.pp;
		sp.cp = currentPage;
		sp.word = encodeURI($('#keyword').val().toString().trim());
		sp.so = $('#sortCol').val();
		sp.ord = $('#sortType').val();
		sp.pin = $('#pin').val();
		sp.cid = $('#cid').val();
		sp.bc = $('#bc').val();
		sp.word += ' ' + $('#sx').val();
		return sp;
	}
	//将得到的商品信息显示在对应的地方
	function listGoods(rs, htmlObj){
		var h = '<div style="font-size:13px;color:red;padding:15px;">找不到任何商品信息</div>';
		if(rs && rs.length > 2){
			var obj = eval(rs)[0];
			var c = obj.count;
			totalNum = c;
			htmlObj.parent('td').parent('tr').find('.totalNum').html('共 ' + c + ' 条记录<br />当前第 ' + currentPage + ' 页');
			var l = obj.list;
			if(c > 0 && l.length > 0){
				h = '';
				for(var i = 0, len = l.length; i < len; i ++){
					var o = l[i];
					var img = o.img;
					var tags = o.tags;
					var name = o.gnm;
					var gsn = o.gsn;
					var tagsStr = '';
					if(tags)
					for(var j = 0, jlen = tags.length; j < jlen; j ++){
						var tg = tags[j];
						tagsStr += '<span class="tagSpanClose"><span class="tagSpanHtml">'+tg+'</span><sup onclick="deleteTagsByWord(this);" class="closeSpan">×</sup></span>';
					}
					h += '<div class="goodsInfoDiv" >';
					h += '<input type="hidden" class="goodsSn" value="'+gsn+'" />';
					h += '<table width="100%" border="0">';
					h += '	<tr>';
					h += '		<td rowspan="2" width="81"><img height="90" width="80" src="http://img2.mbanggo.com/'+img+'" />';
					h += '		</td>';
					h += '		<td height="25"><span style="padding-left:4px;">'+gsn+'&nbsp;&nbsp;'+name+'</span>';
					h += '		</td>';
					h += '	</tr>';
					h += '	<tr>';
					h += '		<td valign="top">';
					h += '		' + tagsStr + '&nbsp;<span class="addBtn" onclick="showGtQuickFloat(this);">+</span></td>';
					h += '	</tr>';
					h += '</table>';
					h += '</div>';
				}
			}
		}
		htmlObj.html(h);
	}
	
	function deleteTagsByWord(thisObj){
		var parentObj = $(thisObj).parent('.tagSpanClose');
		var word = parentObj.find('.tagSpanHtml').html().toString().trim();
		word = encodeURI(word);
		var parentDiv = parentObj.parents('div.goodsInfoDiv');
		var goodsSn = parentDiv.find('input.goodsSn').val();
		ajax('delTagsbw?gsns=' + goodsSn + '&keyword=' + word, function(rs){
			if(currentMenu == 1){
				queryGoods();
			}else{
				queryByTagId();
			}
		});
	}
	
	//按前缀匹配获取标签信息
	function getStartWith(v){
		startWith(v, $('#gtQuickView'), function(rs){
			var h = '';
			if(rs && rs.length > 0){
				var list = eval(rs);
				for(var i = 0, len = list.length; i < len; i ++){
					var o = list[i];
					var id = o.id;
					var word = o.keyWord;
					h += '<div class="gtQuickTagDiv" onclick="addTagToGoods(this);">'+word+'<input type="hidden" class="gtQuickTagId" value="'+id+'" /><input type="hidden" class="gtQuickTagWord" value="'+word+'" /></div>';
				}
			}
			$('#gtQuickView').html(h);
		});
	}
	//根据标签开头，获取相应标签
	function startWith(v, obj, func){
		func = func || function(){};
		if(v == null || v.trim().length < 1){
			obj.html('');
		}else{
			v = encodeURI(v);
			ajax('startWith?keyword=' + v, func);
		}
	}
	
	//单个商品打标签
	function addTagToGoods(thisObj){
		var id = $(thisObj).find('.gtQuickTagId').val();
		var liveDay = $('#gtQuickTagDay').val();
		if(liveDay == null || liveDay.length < 1) {
			liveDay = 0;
		}
		
		$('#temp_tagid').val(id);
		$('#temp_tagname').val($(thisObj).find('.gtQuickTagWord').val());
		
		addTagToGoods1($('#gtQuickGoodsSn').val(), id, liveDay);
		$('#gtQuickTagDay').val('');
	}
	function addTagToGoods1(gsns, ids, liveDay, isOver) {
		liveDay = liveDay || 0;
		isOver = isOver || 0;
		ajax('attTags?gsns=' + gsns + '&ids=' + ids + '&liveDay=' + liveDay + '&isOverFlag=' + isOver, function(rs){
			hideGtQuickFloat();
			//已存在预定义标签
			if(rs && rs.length > 10) {
				showTagInfo(rs);
			}else{
				refreshAfterAddTag();
				showTagInfo();
				slf();
			}
		});
	}
	function refreshAfterAddTag() {
		if(currentMenu == 1){
			queryGoods();
		}else{
			queryByTagId();
		}
	}
	
	function hideGtQuickFloat(){
		$('#gtQuickTagInput').val('');
		$('#gtQuickView').html('');
		$('#gtQuickFloat').css('display', 'none');
	}
	function showGtQuickFloat(thisObj){

		var pObj = $(thisObj).parents('div.goodsInfoDiv');
		var gsn = pObj.find('input.goodsSn').val();
		var floatObj = $('#gtQuickFloat');
		$('#gtQuickGoodsSn').val(gsn);
		$('#gtQuickTagIds').val('');
		
		var windowHeight = $(window).height();
		var thisLeft = $(thisObj).position().left - 0;
		var thisTop = $(thisObj).position().top - 0;
		
		if(currentMenu != 1){
			thisTop -= 570;
		}		
		
		var floatLeft = thisLeft - 0 + 70;
		var floatTop = thisTop - 0 + 90;
		var floatHeight = floatObj.height() - 0;
		if(floatTop + floatHeight > windowHeight){
			floatTop = floatTop - floatHeight;
		}
		floatObj.css({
			'left' : floatLeft + 'px',
			'top' : floatTop + 'px'
		});
		floatObj.fadeIn(0);
		$('#gtQuickTagInput').focus();
	}
	//前20条
	function prevTwenty(){
		if(currentPage <= 1){
			return;
		}
		currentPage --;
		queryGoods();
	}
	//后20条
	function nextTwenty(){
		if(currentPage * goodsObj.pp >= totalNum){
			return;
		}
		currentPage ++;
		queryGoods();
	}
	
	//按标签前20条
	function prevTwenty2(){
		if(currentPage <= 1){
			return;
		}
		currentPage --;
		queryByTagId();
	}
	//按标签后20条
	function nextTwenty2(){
		if(currentPage * tagObj.pp >= totalNum){
			return;
		}
		currentPage ++;
		queryByTagId();
	}
	
	//显示标签冲突信息
	function showTagInfo(html) {
		var tagObj = $('#tagInfoDiv');
		$('#tagInfo_id').val($('#temp_tagid').val());
		$('#tagInfo_name').html($('#temp_tagname').val());
		if(html && html.length > 10) {
			$('#tagHTML').html(html);
			tagObj.showPop({'closeable':false, 'blockStyle' : {opacity:0}});
		}else{
			$('#tagHTML').html('');
			tagObj.hidePop();
		}
	}
	//取消给冲突的商品继续打标签
	function cancelAddChongtu() {
		showTagInfo();
		refreshAfterAddTag();
		slf();
	}
	//确认冲突，继续添加（单个）
	function confirmToAdd1() {
		var gsns = getChongtuGoodsSns();
		var ids = $('#tagInfo_id').val();
		var liveDay =$('#tagInfo_liveday').val();
		if(liveDay == null || liveDay.length < 1) {
			liveDay = 0;
		}
		addTagToGoods1(gsns, ids, liveDay, 1);
	}
	//获得冲突的商品编号
	function getChongtuGoodsSns() {
		return $('input.errorGoodsSn').map(function(){
			return $(this).val();
		}).get().join(',');
	}
	</script>
	<style type="text/css">
	.gtQuickTagDiv{
		cursor:pointer;
		font-size:13px;
		text-align:center;
		width:100%px;
		padding-top:4px;
		padding-bottom:4px;
		margin-top:2px;
		margin-bottom:2px;
		background-color:#BAD0FC;
		line-height:30px;
	}
	input.inputBox{
		border-radius:4px;
		border:1px solid #aaaaaa;
		height:23px;
		padding-left:5px;
	}
	select.inputBox{
		border-radius:4px;
		border:1px solid #aaaaaa;
		height:26px;
		padding-left:1px;
	}
	#tagInputDiv{
		border-radius:4px;
		border:1px solid #aaaaaa;
		padding-left:1px;
		width:700px;
		display:inline-block;
	}
	#tttTable td{
		line-height:34px;
	}
	.tagSpan{
		float:left;
		padding-top:3px;
		padding-bottom:3px;
		padding-left:6px;
		padding-right:5px;
		border-radius:6px;
		background-color:#7099DD;
		color:white;
		margin:2px;
		cursor:pointer;
		font-size:13px;
	}
	.tag_Span{
		float:left;
		padding-top:3px;
		padding-bottom:3px;
		padding-left:6px;
		padding-right:5px;
		border-radius:6px;
		background-color:#7099DD;
		color:white;
		margin:4px;
		cursor:pointer;
		font-size:13px;
	}
	.tagBg{
		background-color:green;
	}
	#gtDiv1List,#gtDiv2List{
		width:1000px;
		overflow:auto;
	}
	#gtDiv1List{
		height:440px;
	}
	#gtDiv2List{
		height:480px;
		margin-top:10px;
	}
	.goodsInfoDiv{
		padding:10px;
		background-color:#ffffff;
		border:1px solid gray;
		margin:3px;
		border-radius:4px;
		float:left;
		width:460px;
	}
	
	.tagSpanClose{
		padding-top:-1px;
		padding-bottom:2px;
		padding-left:3px;
		padding-right:1px;
		border-radius:6px;
		background-color:#5787D7;
		margin:2px;
		font-size:12px;
		color:white;
		float:left;
	}
	.closeSpan{
		cursor:pointer;
		color:red;
		font-size:10px;
	}
	#gtQuickFloat{
		position:absolute;
		width:240px;
		height:300px;
		background-color:white;
		display:none;
		z-index:1000px;
		box-shadow: 
		  rgba(25, 25, 25, 0.85) 
		  2px  
		  2px  
		  5px; 
	}
	.totalNum{
		height:25px;
		padding-bottom:5px;
	}
	.btnStyle1{
		background-color:#91D925;
		border:none;
		border-radius:4px;
		color:white;
		cursor:pointer;
		padding-top:7px;
		padding-bottom:7px;
		padding-left:11px;
		padding-right:11px;
		font-size:13px;
		box-shadow: 
		  rgba(12, 12, 12, 0.65) 
		  1px  
		  1px  
		  6px; 
	}
	</style>
  </head>
  <body style="margin:0px;" >
  	<div style="margin:-3px auto 1px auto;padding-left:20px;text-align:center;">
  		<h3>商品标签管理</h3>
  	</div>
  	<div style="margin:-5px auto 10px auto;padding-left:50px;font-size:13px;">
	  	<input type="button" id="searchByQuery" value="按条件搜索商品" class="btnStyle4" onclick="show(1);" />
	  	<input type="button" id="searchByTag" value="按标签搜索商品" class="btnStyle4" onclick="show(2);" />
  	</div>
  	<div style="width:1200px;margin:auto;" id="outerDiv">
		<div id="gtContainDiv">
			<div id="gtDivs">
				<div id="gtDiv1" class="gtDiv">
					<div id="gtDiv1Sub">
						<table width="100%" border="0" id="tttTable">
							<tr>
								<td colspan="2">关键字：<input type="text" style="width:400px;" class="inputBox" id="keyword" /></td>
								<td>适用人群sx：
									<select id="sx" class="inputBox" >
										<option value="">所有</option>
										<option value="男装">男 male</option>
										<option value="女装">女 fmale</option>
										<option value="童装">童 kide</option>
									</select>
								</td>
								<td>
	  								<input type="button" value="查看" class="btnStyle1" onclick="queryGoods(1);" />&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="button" value="重置" class="btnStyle1" style="background-color:red;" onclick="resetQuery();" />
								</td>
							</tr>
							<tr>
								<td>排序：
									<select class="inputBox" id="sortCol">
										<option value="0">无 0</option>
										<option value="1">价格 1</option>
										<option value="2">销量 2</option>
										<option value="3">上架日期 3</option>
									</select>
									<select class="inputBox" id="sortType">
										<option value="0">不排序 0</option>
										<option value="-1">降序 -1</option>
										<option value="1">升序 1</option>
									</select>
								</td>
								<td>价格区间pin：
									<select id="pin" class="inputBox">
										<option value="">全部</option>
										<option value="1">[0-49]</option>
										<option value="2">[50-99]</option>
										<option value="3">[100-199]</option>
										<option value="4">[200-299]</option>
										<option value="5">[300-5000]</option>
									</select>
								</td>
								<td>分类ID cid：
									<input type="text" class="inputBox" id="cid" size="10" value="" />
								</td>
								<td>品牌CODE bc：
									<input type="text" class="inputBox" id="bc" size="10" value="" />
								</td>
							</tr>
							<tr>
								<td></td>
								<td></td>
								<td></td>
							</tr>
						</table>
						<table width="100%" border="0">
							<tr>
								<td width="1000">
									<div id="gtDiv1List"></div>
									<div style="clear:both;"></div>
								</td>
								<td>
									<div style="height:440px; width:150px;">
										<div style="padding:5px;">
											<table border="0" width="100%">
												<tr>
													<td height="50">
														<div class="totalNum"></div>
	  													<input type="button" value=" 前 20 条 " style="width:100%" class="btnStyle1" onclick="prevTwenty();" />
													</td>
												</tr>
												<tr>
													<td height="320">
														<input type="button" id="batchEditGoods1" value="商品标签批量编辑" style="width:100%" class="btnStyle1" onclick="tagGoodsBatchEdit(1);" />
													</td>
												</tr>
												<tr>
													<td height="30">
	  													<input type="button" value=" 后 20 条 " style="width:100%" class="btnStyle1" onclick="nextTwenty();" />
													</td>
												</tr>
											</table>
										</div>
									</div>
								</td>
							</tr>
						</table>
					</div>
				</div>
				<div id="gtDiv2" class="gtDiv">
					<div id="gtDiv2Sub">
						<table>
							<tr>
								<td>标签：</td>
								<td>
									<div style="height:25px;margin-bottom:-25px;color:#aaaaaa;">
										<span style="padding-top:8px;float:right;padding-right:10px;">
											点击矩形弹出标签选择对话框，点击标签取消选择
										</span>
									</div>
									<div id="tagInputDiv" >
										<div style="display:inline-block;float:left;" id="tagInput">
										</div>
										<div style="height:25px;display:inline-block;float:left;width:20px;" id="anyID"></div>
									</div>
								</td>
								<td>&nbsp;&nbsp;&nbsp;
	  								<input type="button" value="查看" class="btnStyle1" onclick="queryByTagId(1);" />
	  							</td>
							</tr>
						</table>
						<table width="100%">
							<tr>
								<td width="1000">
									<div id="gtDiv2List"> </div>
									<div style="clear:both;"></div>
								</td>
								<td>
									<div style="height:450px; width:150px;">
										<div style="padding:5px;">
											<table border="0" width="100%">
												<tr>
													<td height="50">
														<div class="totalNum"></div>
	  													<input type="button" value=" 前 20 条 " style="width:100%" class="btnStyle1" onclick="prevTwenty2();" />
													</td>
												</tr>
												<tr>
													<td height="320">
														<input type="button" value="商品标签批量编辑" style="width:100%" class="btnStyle1" onclick="tagGoodsBatchEdit(2);" />
													</td>
												</tr>
												<tr>
													<td height="30">
	  													<input type="button" value=" 后 20 条 " style="width:100%" class="btnStyle1" onclick="nextTwenty2();" />
													</td>
												</tr>
											</table>
										</div>
									</div>
								</td>
							</tr>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<!-- 标签查询浮层 -->
	<div id="gtFloat" style="width:500px;height:390px;display:none;background-color:white;">
		<div style="padding:20px;">
			<input type="text" class="inputBox" id="findTagInput" size="50" value="" />
			<input type="button" class="inputBox" style="cursor:pointer;" id="listTagsId" value="查询" onclick="listTags();" />
			<div style="margin-top:15px;height:284px;" id="findTagShow">
				
			</div>
			<div style="clear:both;"></div>
			<div style="margin-top:-5px;">
				<input type="button" class="inputBox" style="cursor:pointer;width:130px;padding:8px;height:40px;" value="确定" onclick="confirmTags();" />
				<input type="button" class="inputBox" style="cursor:pointer;width:130px;padding:8px;height:40px;" value="取消" onclick="confirmTags1();" />
			</div>
		</div>
	</div>
	
	<!-- 标签快速预览层 -->
	<div id="gtQuickFloat">
		<div style="padding:10px;">
			<input type="text" value="" id="gtQuickTagInput" style="width:140px;display:inline-block;" />
			<input type="text" value="" onkeyup="this.value=this.value.replace(/[^\d]/gi,'');" id="gtQuickTagDay" style="width:60px;display:inline-block;" title="有效天数" />
			<input type="hidden" value="" id="gtQuickGoodsSn" />
			<input type="hidden" value="" id="gtQuickTagIds" />
			<div id="gtQuickView" style="margin-top:10px;">
				
			</div>
		</div>
	</div>
	
	
	<input type="hidden" value="" id="temp_tagid" />
	<input type="hidden" value="测试" id="temp_tagname" />
	<!-- 商品批量标签编辑 -->
  	<#include "./goods_tag_edit.ftl" />
  	
  </body>
</html>
